package com.example.service.impl;


import com.example.mapper.CommoditMapper;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.example.entity.Business;
import com.example.entity.Commodit;
import com.example.mapper.BusinessMapper;
import com.example.mapper.CommoditMapper;
import com.example.entity.Commodit;
import com.example.mapper.CommoditMapper;
import com.example.service.ICommoditService;
import org.springframework.beans.factory.annotation.Autowired;
import com.example.util.QueryBean;
import org.springframework.beans.factory.annotation.Autowired;
import com.example.util.Pro;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import java.util.List;
import java.util.Map;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author tyhxzy
 * @since 2023-11-03
 */
@Service
public class CommoditServiceImpl  implements ICommoditService {
    @Autowired
    private CommoditMapper commoditMapper;

    @Override
    public List<Pro> findAll(Commodit commodit) {
        return commoditMapper.findCom(commodit);
    }

    @Override
    public int updateStatus1(Integer id) {
        return commoditMapper.updateStatus1(id);
    }


    @Override
    public int updateStatus2(Integer id) {
        return commoditMapper.updateStatus2(id);
    }

    @Override
    public int addCommodit(Commodit commodit) {
        return commoditMapper.addCommodit(commodit);
    }

    @Override
    public Map findByid(Integer id) {
        return commoditMapper.findByid(id);
    }

    @Override
    public List<Map> findAll() {
        return commoditMapper.findAll();
    }

    @Override
    public List<Map> findall(Integer id) {
        return commoditMapper.findalls(id);
    }


}
